package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.OrdersItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 操作订单详情表相关数据接口
 */
public interface OrdersItemMapper extends BaseMapper<OrdersItem> {

    int updateById(OrdersItem ordersItem);

    OrdersItem selectById(Integer id);

    List<OrdersItem> selectAll(OrdersItem ordersItem);

    @Delete("delete from orders_item where order_id = #{id}")
    void deleteByOrderId(Integer id);

}